package
{
	import mx.collections.ArrayCollection;
	
	public class DespairUtil
	{
		
		
		
		public static function getIndexFromDataProvider(element:*,dataProvider:ArrayCollection):int
		{
			var len:int;
			var map:Object;
			var item:*
			
			len = dataProvider.length;
			while(--len > -1)
			{
				map = dataProvider.source[len];
				for each(item in map)
				{
					if(item == element)
					{
						return len;
					}
				}
			}
			
			return -1;
		}
		
		
	}
}